<template>
	<view>
		<yu-calendar
		    :priceList="priceList" 
		    bgColor="#3570cc" 
		    color="#fff">
		</yu-calendar>
		<view class="desc">注: 标点表示档期被占用，不可再预约(仅显示最近一年的档期)</view>
	</view>
</template>

<script>
	import yuCalendar from "@/components/yu-calendar/yu-calendar.vue";
	import { dns } from "@/pages/dns.js";
	export default {
	    components: {
	        yuCalendar
	    },
	    data() {
	        return {
				priceList: [
				]
			};
	    },
		watch:{
			priceList(oldVal,newVal){
				// console.log(oldVal,newVal)
			}
		},
		onLoad(e) {
			this.id = e.id;
			this.getcalendar();
		},
	    methods: {
			getcalendar(){//获取月嫂档期
				uni.request({
					method: 'GET',
					data: {
						id: this.id
					},
					url: dns + 'matron/time_arrange',
					success: (res)=>{
						if(res.data.status == 1){
							this.priceList = res.data.data;
						}
					}
				})
			}
	    }
	};
</script>

<style lang="scss">
	.desc{
		font-size: 28upx;
		padding: 0 30upx;
	}
</style>
